function parseTime(rawTime) {
    var hhmm = rawTime.substr(-4)
    return hhmm.substr(0,2)+":"+hhmm.substr(2,2)
}

function parseType(rawType) {
    var retVal;
    var transportType=new Array(
            "Helsi",
            "Trams",
            "Espoo",
            "Vanta",
            "Regio",
            "Metro",
            "Ferry",
            "ULine",
            "CTrai",
            "HelSe",
            "HelNi",
            "EspSe",
            "VanSe",
            "RegNi",
            "Kirkk",
            "Kerav"
            );

    if (rawType=="walk") {
        retVal = "Walk"
    } else {
        console.log("MAXMAXMAX/rawType="+rawType)
        retVal = transportType[rawType];
    }

    return retVal;
}

function parseCode( rawCode ) {
    var retVal;

    var areaTransportTypeCode=rawCode.substr(0,1);
    var lineCode=rawCode.substr(1,3);
    var letterVariant=rawCode.substr(4,1);
    var letterNumberVariant=rawCode.substr(5,1);
    var direction=rawCode.substr(6,1);

    retVal = lineCode;

    if (letterVariant != " ") {
        retVal += letterVariant;
    }

    return retVal;
}
